package io.github.bigbird0101.datatransfer.model.config;

import io.github.bigbird0101.datatransfer.model.param.ColumnParameters;
import io.github.bigbird0101.datatransfer.model.param.WriterParameters;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class KafkaWriterConfig extends WriterParameters implements Serializable {

    /**
     * 分割符
     */
    private String fieldDelimiter;

    /**
     * kafka地址
     */
    private String bootstrapServers;

    /**
     * topic
     */
    private String topic;

    /**
     * 写入kafka策略 1，0，all
     */
    private String acks;

    /**
     * 每一批写的数量量
     */
    private Integer batchSize;
    /**
     * 重试次数
     */
    private Integer retries;
    /**
     * key 序列化
     */
    private String keySerializer;
    /**
     * value 序列化
     */
    private String valueSerializer;

    /**
     * 当不存在topic 时是否自动创建
     */
    private boolean autoCreate;

    private Integer topicNumPartition;

    private Short topicReplicationFactor;

    private List<ColumnParameters> column;

    /**
     * json,text
     */
    private String writeType;

    public boolean getAutoCreate() {
        return autoCreate;
    }

    public void setAutoCreate(boolean autoCreate) {
        this.autoCreate = autoCreate;
    }


}
